#include <stdint.h>
#ifdef __x86_64__
typedef struct Context
{
    uint64_t r12;
    uint64_t r13;
    uint64_t r14;
    uint64_t r15;
    uint64_t rip;
    uint64_t rsp;
    uint64_t rbx;
    uint64_t rbp;
} Context;

static inline void MakeContext(Context *context, void *stack, void *func)
{
    context->rip = (uint64_t)func;
    context->rsp = (uint64_t)stack - 8;
    context->rbp = (uint64_t)stack - 8;
}
#else
#error "platform not support"
#endif
